<?php

class ObjectList {
	
	private $_name;
	private $_value;
	private $_type;
	
	const _PUBLIC	= 1;
	const _PRIVATE 	= 2;

	
	function __construct($_name, $_value, $_type = ObjectList::_PUBLIC) {
		try {
			$this->setName		( $_name );
			$this->setValue 	( $_value );
			$this->setType		( $_type );
		} catch ( IllegalArgumentException $ex ) {
			throw $ex;
		}
	}
	
	/**
	 * @return unknown
	 */
	public function getName() {
		return $this->_name;
	}
	
	/**
	 * @return unknown
	 */
	public function getType() {
		return $this->_type;
	}
	
	/**
	 * @return unknown
	 */
	public function getValue() {
		return $this->_value;
	}
	
	/**
	 * @param unknown_type $_name
	 */
	public function setName($_name) {
		$this->_name = $_name;
	}
	
	/**
	 * @param unknown_type $_type
	 */
	public function setType($_type) {
		if ( in_array($_type, array( ObjectList::_PUBLIC, ObjectList::_PRIVATE ) ) ) {
			$this->_type = $_type;
		} else {
			throw new IllegalArgument("ObjectList type ".$_type." not allowed");
		}
	}
	
	/**
	 * @param unknown_type $_value
	 */
	public function setValue($_value) {
		$this->_value = $_value;
	}

}

?>